package com.th.supcom.pds.dispensedrug.client.service;

import java.util.List;

import net.carefx.framework.container.client.exception.UiException;

import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.th.supcom.pds.common.client.commom.PdsAuditPrescServiceFactory;
import com.th.supcom.pds.internal.client.model.ResultModel;
import com.th.supcom.pds.sortingdrug.client.model.PdsPrescDetailInfoModel;

/**
 * PdsPrescDetail 服务接口.
 * 
 * 处方明细.
 */
@RemoteServiceRelativePath (PdsAuditPrescServiceFactory.BASE_URL + "pdsPrescDetail.do")
public interface PdsSupplyDetailRpc extends RemoteService
{

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";

    /**
     * 添加信息.
     * 
     * @param Model
     * @throws UiException 界面异常
     */
    public void addPdsPrescDetail (PdsPrescDetailInfoModel model) throws UiException;


    /**
     * 查询信息.
     * 
     * @param Model
     * @throws UiException 界面异常
     */
    public PdsPrescDetailInfoModel getPdsPrescDetailById (Long id) throws UiException;

    /**
     * 根据处方详情对象获取List信息
     * 
     * @param model
     * @return
     * @throws UiException
     */
    public List <PdsPrescDetailInfoModel> getPdsPrescDetailList (PdsPrescDetailInfoModel model) throws UiException;

    /**
     * 分页查询信息.
     * 
     * @param config
     * @return
     */
    public PagingLoadResult <PdsPrescDetailInfoModel> getPdsPrescDetailListWithPaging (PagingLoadConfig config);

    /**
     * 根据处方号或者消费凭证号查询符合条件的所有处方详情信息，并且附带处方主记录信息
     * 
     * @param params
     * @return List
     * @throws UiException
     */
    public List <PdsPrescDetailInfoModel> getPrescDetailByPrescAndRcpt (String rcptNo, String prescNo) throws UiException;

    /**
     * 修改信息.
     * 
     * @param Model
     * @throws UiException 界面异常
     */
    public void modifyPdsPrescDetail (List <PdsPrescDetailInfoModel> model) throws UiException;

    /**
     * 删除信息.
     * 
     * @param code
     * @throws UiException 界面异常
     */
    public void removePdsPrescDetail (Long id) throws UiException;
}